<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <style>
        ul {
            width: 100px;
            height: 100px;
            background-color: orange;
        }
    </style>
</head>
<body>
    <div id="root">
        <h1>a的值是：{{a}}</h1>
        <button @click="a++">a++</button>
        <ul v-show="false"></ul>
        <ul v-if="a === 1">c++</ul>
        <ul v-else-if="a === 2">java</ul>
        <ul v-else>pathon</ul>

        <!-- template和v-if的配合使用 -->
        <!-- template结构不会渲染到页面中 -->
        <template v-if='true'>
            <ul>1</ul>
            <ul>2</ul>
            <ul>3</ul>
        </template> 
    </div>
    <script>
        Vue.config.productionTip = false;
        let vm = new Vue({
            el: '#root',
            data: {
                a: 0,
            },
            methods: {
            },
        });
    </script>
</body>
</html>